"use strict";
// const showDecorator:MethodDecorator = (...args:any[]) => {
//     // console.log(args);  //args中包含三个元素，第一个：如果修饰的方法是静态方法，为构造函数；如果修饰的方法为普通方法，为原型对象
//                            //args中包含三个元素，第二个：方法名
//                            //args中包含三个元素，第三个：对象，第一个属性是函数的具体内容，第二个属性writable(方法是否可修改)，第三个属性enumerable(方法是否可查看)，第四个属性configurable(方法是否可增删)
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
//     args[0].name = "后盾人";
//     args[2].value = () => {
//         console.log("hdms");
//     }
// }
const showDecorator = (target, propertyKey, descriptor) => {
    target.name = "后盾人";
    descriptor.value = () => {
        console.log("hdms");
    };
};
class User {
    show() {
        console.log('houdunren.com');
    }
}
__decorate([
    showDecorator,
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", void 0)
], User.prototype, "show", null);
console.log(new User().name); //证明元素一是原型对象，所以show方法为普通方法
new User().show(); //证明元素三的value是函数内容
